30 DIM P(50),P$(50),TN$(50),S$(20),S(50,20),GAMTOT(50),AVG!(50),MONTOT(50),PLYR$(50),PLYR(50),ST(20),R(50),MONEY(50),GAMDIG(50),MONDIG(50),T(20),SCORTOT(50),GMTOT(50),P3HTOT(50),P3STOT(50),P4HTOT(50),P4STOT(50),P5HTOT(50),P5STOT(50),P3AVG!(50)
35 DIM P4AVG!(50),P5AVG!(50)
40 ON ERROR GOTO 33000
1000 CLOSE:REM****************************************MAIN MENU
1010 GOSUB 26000:LOCATE 7,20:PRINT"HERE'S WHAT WE CAN DO FOR YOU:":LOCATE 9,25:PRINT"1. Input Information":LOCATE 10,25:PRINT"2. Modify Information":LOCATE 11,25
1410 CLS:PRINT"This routine prepares the diskette in the default drive to use the"
1420 PRINT"GOLFCARD program. It must be run before GOLFCARD is used for the":PRINT"first time."
1430 PRINT:PRINT"If the diskette in the default drive has already been used with"
1440 PRINT"the GOLFCARD program, this routine will wipe out any data entered."
1450 PRINT:PRINT"Do you want to proceed with the initialization routine?"
1460 PRINT"(Type `Y' or `N') ";
1465 INPUT"",A$
1470 IF A$ = "Y" OR A$ = "y" THEN 1500
1480 IF A$ = "N" OR A$ = "n" THEN 1000
1490 BEEP:PRINT"Please type `Y' or `N'. ";:GOTO 1465
1500 PRINT:PRINT:PRINT SPC(24);:COLOR 0,7:PRINT" WARNING: DATA WILL BE DESTROYED ":COLOR 7,0:BEEP:BEEP:BEEP
1510 PRINT:PRINT:PRINT"Press `I' to run initialization routine. Press any other"
1520 PRINT"key to return to Main Menu. "
1530 A$ = INKEY$
1540 IF A$ = "" THEN 1530
1550 IF A$ <> "I" AND A$ <> "i" THEN 1000
1555 CLS:LOCATE 10,30:PRINT"One moment please....."
1560 OPEN "course.dat" FOR OUTPUT AS #1:CLOSE #1:KILL "course.dat":OPEN "COURSE.DAT" FOR OUTPUT AS #1: CLOSE #1
1570 OPEN "round.dat" FOR OUTPUT AS #1:CLOSE #1:KILL "round.dat":OPEN "ROUND.DAT" FOR OUTPUT AS #1: CLOSE #1
1580 OPEN "golfers.dat" FOR OUTPUT AS #1:CLOSE #1:KILL "golfers.dat":OPEN "GOLFERS.DAT" FOR OUTPUT AS #1: CLOSE #1
1590 OPEN "golfptr.dat" FOR OUTPUT AS #1:PRINT #1,0:CLOSE #1:OPEN "coursptr.dat" FOR OUTPUT AS #1:PRINT #1,0:CLOSE #1:OPEN "roundptr.dat" FOR OUTPUT AS #1:PRINT #1,0:CLOSE #1: GOTO 1000
2000 CLOSE:REM****************************************INPUT MENU
2010 GOSUB 26000:LOCATE 7,20:PRINT"HERE'S WHAT YOU CAN INPUT:":LOCATE 9,25:PRINT"1. New Golfer(s)":LOCATE 11,25:PRINT"2. New Course":LOCATE 13,25:PRINT"3. Game Results":LOCATE 15,25:PRINT"4. Return to Main Menu"
2120 LOCATE 20,20:INPUT"Please type the number of your choice. ",A
2140 ON A GOTO 5000,6000,7000,1000
2150 BEEP:GOTO 2120
3000 REM****************************************MODIFICATION MENU
3010 GOSUB 26000
3020 LOCATE 7,20:PRINT"HERE'S WHAT YOU CAN MODIFY:":LOCATE 9,25:PRINT"1. Player Name":LOCATE 11,25:PRINT"2. Course Name":LOCATE 13,25:PRINT"3. Course Pars":LOCATE 15,25:PRINT"4. Game Results":LOCATE 17,25:PRINT"5. Return to Main Menu"
3140 LOCATE 20,20:INPUT"Please type the number of your choice. ",A
3160 ON A GOTO 10000,11000,12000,13000,1000
3170 BEEP:GOTO 3140
4000 CLOSE:REM****************************************DISPLAY MENU
4025 GOSUB 26000:LOCATE 7,20:PRINT"HERE'S THE INFORMATION YOU CAN HAVE DISPLAYED":GOSUB 4030:GOTO 4200
4030 LOCATE 9,25:PRINT"1. List of registered golfers
4040 LOCATE 10,25:PRINT"2. All players' averages":LOCATE 11,25:PRINT"3. All players' winnings/losses":LOCATE 12,25:PRINT"4. All players' hole averages by par":LOCATE 13,25:PRINT"5. Individual player's average for any course":LOCATE 14,25
4041 PRINT"6. Individual player's hole averages by par":LOCATE 15,25:PRINT"7. Individual player's rounds to date":LOCATE 16,25:PRINT"8. Course data":LOCATE 17,25:PRINT"9. Individual game":LOCATE 18,24:PRINT"10. Return to Main Menu":RETURN
4200 LOCATE 20,20:INPUT"Please type the number of your choice. ",A
4220 ON A GOTO 14000,15000,16000,30100,17000,18000,19000,20000,30000,1000
4230 BEEP:GOTO 4200
5000 REM***************************************INPUT NEW GOLFERS
5001 OPEN "GOLFPTR.DAT" FOR INPUT AS #1:INPUT #1,N:CLOSE #1:IF N<48 THEN 5005
5003 CLS:PRINT"Sorry, there are already 48 golfers registered.":PRINT:PRINT"If you would like to substitute a new player for any existing player who":PRINT"has not already played, you may do so by using the MODIFICATION option."
5004 PRINT:PRINT:GOTO 27000
5005 CLS:LOCATE 5,1:GOSUB 5010:GOTO 1000
5010 PRINT"All new golfers must register.":PRINT:PRINT"Please provide golfers' names as you would like them listed in our":PRINT"official records. Our membership can go up to 48, but please":PRINT"do not register more than 10 golfers at one time."
5110 LOCATE 25,1:PRINT"Type `END' when finished.";:LOCATE 14,15:PRINT" _______________":LOCATE 14,1
5120 INPUT "Golfer's name: ",N$(K)
5130 IF LEN (N$(K))>15 THEN CLS:LOCATE 5,1:PRINT"Sorry, that name is too long. Please shorten":PRINT"the name to fit on the dashed line (15 characters).":GOTO 5110
5140 IF N$(K) <> "end" AND N$(K) <>"End" AND N$(K) <> "END" AND K<L THEN K = K+1:CLS:LOCATE 12,1:GOTO 5110
5150 IF N$(K) <> "end" AND N$(K) <>"End" AND N$(K) <> "END" THEN K = K+1
5290 PRINT:INPUT "Which line would you like to change";LN
5300 IF LN<1 OR LN>(K-1) THEN PRINT"Wrong number.....please try again.":GOTO 5290
5320 CLS:LOCATE 3,1:PRINT"It currently reads: ";N$(LN)
5330 PRINT "It should read: ";:LOCATE 4,17:FOR I = 1 TO 15:PRINT"_";:NEXT I:LOCATE 4,1:INPUT "It should read: ",NN$
5340 IF LEN (NN$)>15 THEN LOCATE 6,1:PRINT"Sorry, that name is too long. Please shorten":PRINT"the name to fit on the dashed line (15 characters).":FOR P=1 TO 30:FOR I = 1 TO 3000:NEXT I:NEXT P:GOTO 5320
5348 N$(LN)=NN$:GOTO 5200
5350 OPEN "golfptr.dat" FOR INPUT AS #1:INPUT #1,GOLFERS:CLOSE #1:GOLFERS=GOLFERS+K-1:OPEN "golfptr.dat" FOR OUTPUT AS #1:PRINT #1,GOLFERS:CLOSE #1:OPEN "golfers.dat" FOR APPEND AS #4:FOR I = 1 TO K-1:PRINT #4,N$(I):NEXT I:RETURN
6000 REM****************************************INPUT NEW COURSE
6010 GOSUB 6030:GOTO 1000
6030 CLS:PRINT"Do you want to enter information about a new golf course?"
6040 PRINT"(Type `Y' or `N') ";
6050 INPUT"",A$
6060 IF A$ = "y" OR A$ ="Y" THEN 6090
6070 IF A$="n" OR A$ = "N" THEN 1000
6080 BEEP:PRINT"Please type `Y' or `N'. ";:GOTO 6050
6090 CLS:LOCATE 1,33:FOR I = 1 TO 26:PRINT"_";:NEXT I:LOCATE 1,1:PRINT"What is the name of the course?":PRINT:PRINT"PLEASE NOTE: If you would like the scores from this course to be"
6091 PRINT"automatically excluded from calculations of player averages, type":PRINT"an asterisk (*) as the first or last character in the course name."
6158 LOCATE 1,33:INPUT"",CORS$:IF CORS$="" THEN 6158
6160 IF LEN (CORS$)>26 THEN LOCATE 8,1:PRINT"Sorry, that name is too long. Please shorten":PRINT"the name to fit on the dashed line (26 characters).":FOR P=1 TO 30:FOR I = 1 TO 3000:NEXT I:NEXT P:GOTO 6090
6170 LOCATE 10,1:PRINT"Please enter PAR for each hole."
6180 FOR I = 1 TO 9
6190 LOCATE 12+I:PRINT"Hole";I;CHR$(29);": ";:INPUT "",P(I):NEXT I
6200 FOR I = 10 TO 18:LOCATE 3+I,40:PRINT"Hole";I;CHR$(29);": ";:INPUT"",P(I):NEXT I
6210 CLS:GOSUB 24000:LOCATE 17,1
6230 PRINT "Is this information correct? (Type `Y' or `N') ";
6240 INPUT"",A$:A$=MID$(A$,1,1)
6250 IF A$ = "y" OR A$ ="Y" THEN 6470
6260 IF A$="n" OR A$ = "N" THEN 6280
6270 BEEP:LOCATE 17,49:FOR I=1 TO 32:PRINT" ";:NEXT I:LOCATE 17,56:PRINT"`Y' or `N', please: ";:GOTO 6240
6280 PRINT"Is the name correct? (Type `Y' or `N') ";
6290 INPUT"",A$:A$=MID$(A$,1,1)
6300 IF A$ = "y" OR A$ ="Y" THEN 6420
6310 IF A$="n" OR A$ = "N" THEN 6330
6320 BEEP:LOCATE 18,41:FOR I=1 TO 40:PRINT" ";:NEXT I:LOCATE 18,56:PRINT"`Y' or `N', please: ";:GOTO 6290
6330 LOCATE 20,1:PRINT"Old name = ";CORS$
6340 LOCATE 21,12:FOR I = 1 TO 26: PRINT"_";:NEXT I:LOCATE 21,1
6350 INPUT "New name = ",NC$
6360 IF LEN(NC$)>26 THEN LOCATE 22,1:PRINT"Sorry, that name is too long. Please shorten":PRINT"the name to fit on the dashed line (26 characters).":FOR P=1 TO 30:FOR I = 1 TO 3000:NEXT I:NEXT P:GOTO 6380
6370 CORS$=NC$:GOTO 6210
6380 FOR I=20 TO 24:LOCATE I,1:FOR P=1 TO 79:PRINT" ";:NEXT P:NEXT I:GOTO 6330
6420 INPUT "Which hole is incorrect";H
6430 IF H<1 OR H>18 THEN PRINT"Please type a number from 1 to 18":GOTO 6420
6440 PRINT"Old par =";P(H):INPUT "New par = ",P(H)
6460 GOTO 6210
6470 OPEN "coursptr.dat" FOR INPUT AS #1:INPUT #1,L:L= L+1:CLOSE #1
6480 OPEN "COURSPTR.DAT" FOR OUTPUT AS #1:PRINT #1,L:CLOSE #1
6500 OPEN "COURSE.DAT" AS #2 LEN=62
6510 FIELD #2,26 AS COURSE$,2 AS P$(1),2 AS P$(2),2 AS P$(3),2 AS P$(4),2 AS P$(5),2 AS P$(6),2 AS P$(7),2 AS P$(8),2 AS P$(9),2 AS P$(10),2 AS P$(11),2 AS P$(12),2 AS P$(13),2 AS P$(14),2 AS P$(15),2 AS P$(16),2 AS P$(17),2 AS P$(18)
6520 LSET COURSE$ = CORS$:FOR I = 1 TO 18:LSET P$(I)=MKI$(P(I)):NEXT I:PUT #2,L
6560 RETURN
7000 REM****************************************INPUT GAME RESULTS
7010 CLS:PRINT"Do you want to enter game results?"
7020 PRINT"(Type `Y' or `N') ";
7030 INPUT"",A$
7040 IF A$ = "y" OR A$ ="Y" THEN PRINT:GOSUB 25000:GOTO 7070
7050 IF A$="n" OR A$ = "N" THEN 1000
7060 BEEP:PRINT"Please type `Y' or `N'. ";:GOTO 7030
7070 CLS:OPEN "COURSPTR.DAT" FOR INPUT AS #1
7080 INPUT #1,L:IF L = 0 THEN PRINT"Sorry, there are no courses listed in our files. Before proceeding,":PRINT"you must go to the Course Entry section and enter a course.":LOCATE 25,1:GOTO 27000
7100 CLOSE #1:OPEN "COURSE.DAT" AS #2 LEN = 62
7110 FIELD #2,26 AS COURSE$,2 AS P$(1),2 AS P$(2),2 AS P$(3),2 AS P$(4),2 AS P$(5),2 AS P$(6),2 AS P$(7),2 AS P$(8),2 AS P$(9),2 AS P$(10),2 AS P$(11),2 AS P$(12),2 AS P$(13),2 AS P$(14),2 AS P$(15),2 AS P$(16),2 AS P$(17),2 AS P$(18)
7120 Y = L/2:FOR I = 1 TO Y:GET #2,I:IF I>9 THEN PRINT I;CHR$(29);". ";COURSE$:GOTO 7170
7160 PRINT " ";I;CHR$(29);". ";COURSE$
7170 NEXT I:FOR I = (Y+1) TO L:GET #2,I:LOCATE (I-Y),40:IF I>9 THEN PRINT I;CHR$(29);". ";COURSE$:GOTO 7230
7220 PRINT " ";I;CHR$(29);". ";COURSE$
7230 NEXT I:IF (L+1)/2 = Y THEN PRINT
7240 PRINT:PRINT:PRINT"What course number, please? (If course doesn't appear on this list, enter `99'.This will allow you to enter the course into our files.) ";
7245 INPUT"",CORS
7250 IF CORS = 99 THEN CLOSE:GOSUB 6030:CLOSE:GOTO 7000
7260 IF CORS<1 OR CORS>L THEN PRINT:PRINT"Wrong number.....try again. ";:PRINT"What course number, please? ";:GOTO 7245
7270 GET #2,CORS
7280 FRONTP = 0:BACKP = 0:FOR I = 1 TO 9:FRONTP = FRONTP + CVI(P$(I)):NEXT I:FOR I = 10 TO 18:BACKP = BACKP +CVI(P$(I)):NEXT I:TOTP = FRONTP + BACKP
7320 CLS:INPUT"How many players? ",PLYRS
7330 IF PLYRS<1 THEN BEEP:GOTO 7320
7340 CLS:GOSUB 22000:IF K<>0 THEN 7350
7345 PRINT"Do you want to enter players' names? (Type `Y' or `N'.) ";
7346 INPUT"",A$
7347 IF A$="Y" OR A$="y" THEN GOSUB 5010:CLOSE:GOTO 7000
7348 IF A$="N" OR A$="n" THEN 1000
7349 BEEP:PRINT"Please type `Y' or `N'. ";:GOTO 7346
7350 PRINT:PRINT:FOR M = 1 TO PLYRS
7360 PRINT:PRINT"Select Player ";CHR$(29);M;:INPUT"please: ",PLYR(M)
7370 IF PLYR(M)<1 OR PLYR(M) >K THEN PRINT"Wrong number.....try again. ";:GOTO 7360
7390 NEXT M:CLS:PRINT"Course: ";COURSE$:PRINT:FOR M = 1 TO PLYRS:PRINT"Player";M;CHR$(29);": ";TN$(PLYR(M)):NEXT M:PRINT
7450 PRINT"Please enter the amount of money (in even dollars) that each player"
7460 PRINT"won or lost. Indicate a loss by a negative number. If no money":PRINT"was won or lost, enter `0'.":PRINT:FOR M = 1 TO PLYRS
7490 PRINT"How much did ";TN$(PLYR(M)) ;:INPUT" win or lose";MONEY(M):NEXT M:FOR M =1 TO PLYRS:PRINT:PRINT TN$(PLYR(M));":":FOR I = 1 TO 18
7540 IF I<10 THEN PRINT " Hole";I;:INPUT" score: ",S(M,I):GOTO 7560
7640 FOR I = 1 TO 18:PRINT CVI(P$(I));:PARTOT = PARTOT + CVI(P$(I)):NEXT I:PRINT " ";PARTOT:PRINT:FOR M = 1 TO PLYRS:IF PLYRS>4 THEN D=PLYRS+1 ELSE D=5
8770 INPUT"Whose score would you like to change? Please type the player's number: ",M
8780 IF M<1 OR M>PLYRS THEN LOCATE 18,1:PRINT "Wrong number.....please try again.":FOR P=1 TO 30:FOR T= 1 TO 3000:NEXT T:NEXT P:LOCATE 16,1:FOR N = 1 TO 80:PRINT" ";:NEXT N:LOCATE 18,1:FOR N=1 TO 80:PRINT" ";:NEXT N:GOTO 8760
8790 LOCATE 18,1
8800 INPUT"What hole would you like to change";I
8810 IF I<1 OR I>18 THEN LOCATE 20,1:PRINT"Wrong number.....please try again.":FOR P=1 TO 30:FOR T = 1 TO 3000:NEXT T:NEXT P:LOCATE 18,1:FOR N = 1 TO 80:PRINT" ";:NEXT N:LOCATE 20,1:FOR N = 1 TO 80:PRINT" ";:NEXT N:GOTO 8790
8820 LOCATE 20,1:INPUT"What should the score be";S(M,I)
8850 CLS:FOR M = 1 TO PLYRS:PRINT"Player";M;"(";TN$(PLYR(M));")";": ";MONEY(M):NEXT M
8860 PRINT:INPUT"What is the number of the player whose earnings are to be changed";NUM
8870 IF NUM<1 OR NUM>PLYRS THEN PRINT"Wrong number.....please try again.":GOTO 8860
8880 INPUT "Please enter the proper amount: ",MONEY(NUM):GOTO 7600
8900 RETURN
8910 CLOSE:OPEN "roundptr.dat" FOR INPUT AS #1:INPUT #1,ROUNDS:CLOSE #1
8940 OPEN "round.dat" AS #3 LEN = 59
8950 FIELD #3,8 AS D$,5 AS N$,5 AS C$,5 AS M$,2 AS S$(0),2 AS S$(1),2 AS S$(2),2 AS S$(3),2 AS S$(4),2 AS S$(5),2 AS S$(6),2 AS S$(7),2 AS S$(8),2 AS S$(9),2 AS S$(10),2 AS S$(11),2 AS S$(12),2 AS S$(13),2 AS S$(14),2 AS S$(15),2 AS S$(16),2 AS S$(17)
8960 FOR I = 1 TO PLYRS:ROUNDS = ROUNDS + 1:LSET N$=MKI$(PLYR(I)):LSET C$=MKI$(CORS):LSET M$=MKI$(MONEY(I)):LSET D$=DT$:FOR H=1 TO 18:LSET S$(H-1)=MKI$(S(I,H)):NEXT H:PUT #3,ROUNDS:NEXT I:OPEN "roundptr.dat" FOR OUTPUT AS #1:PRINT #1,ROUNDS
9110 GOTO 1000
9120 CLOSE:RETURN
10000 REM****************************************MODIFY PLAYER NAME
10010 CLS:GOSUB 22000:IF K= 0 THEN LOCATE 25,1:GOTO 27000
10020 IF (K+1)/2 = Y THEN PRINT
10025 PRINT
10030 PRINT:INPUT"Please type the number of the player whose name you wish to change: ",X
10040 IF X <1 OR X>K THEN PRINT"Wrong number.....please try again.":GOTO 10030
10050 CLS:PRINT"The name currently reads: ";TN$(X)
10080 IF LEN (NN$)>15 THEN LOCATE 15,1:PRINT"Sorry, that name is too long. Please shorten the":PRINT"name to fit on the dashed line (15 characters).":FOR P=1 TO 30:FOR T=1 TO 3000:NEXT T:NEXT P:GOTO 10050
10090 TN$(X)=NN$:CLOSE:KILL"golfers.dat":OPEN"golfers.dat" FOR OUTPUT AS #4:FOR I=1 TO K:PRINT #4,TN$(I):NEXT I:GOTO 1000
11000 REM****************************************MODIFY COURSE NAME
11010 CLS:GOSUB 23000:IF L = 0 THEN PRINT"Sorry, there are no courses listed in our files.":LOCATE 25,1:GOTO 27000
11020 PRINT:PRINT:INPUT"Please type the number of the course whose name you would like to change: ",C
11030 IF C<1 OR C>L THEN PRINT"Wrong number .....please try again.":GOTO 11020
11040 CLS:GET #2,C
11050 PRINT"The course name currently reads: ";COURSE$
11060 LOCATE 2,30:FOR I=1 TO 26:PRINT"_";:NEXT I:LOCATE 2,1
11070 INPUT "The course name should read: ",NC$
11080 IF LEN(NC$)>26 THEN 11120
11090 LSET COURSE$=NC$:PUT #2,C:GOTO 11170
11120 PRINT:PRINT"Sorry, that name is too long. Please shorten":PRINT"the name to fit on the dashed line (26 characters).":FOR P=1 TO 30:FOR T= 1 TO 3000:NEXT T:NEXT P
11130 LOCATE 2,30:FOR I = 1 TO LEN(NC$):PRINT" ";:NEXT I
11140 FOR I=1 TO 2:LOCATE 3+I,1:PRINT" ":NEXT I
11160 GOTO 11060
11170 GOTO 1000
12000 REM****************************************MODIFY COURSE PARS
12010 CLS:GOSUB 23000:IF L = 0 THEN PRINT"Sorry, there are no courses listed in our files":LOCATE 25,1:GOTO 27000
12020 PRINT:PRINT:PRINT"Please type the number of the course you would like to correct. ";
12025 INPUT"",C
12030 IF C<1 OR C>L THEN PRINT"Wrong number.....try again.":GOTO 12025
12040 GET #2,C:CORS$ = COURSE$:CLS:FOR I = 1 TO 18:P(I)=CVI(P$(I)):NEXT I:GOSUB 24000
12080 LOCATE 16,1
12090 PRINT:INPUT "Which hole is incorrect";H
12100 IF H<1 OR H>18 THEN PRINT"Please type a number from 1 to 18":GOTO 12080
12110 PRINT"Old par =";P(H)
12120 INPUT "New par = ",P(H)
12130 FOR I = 1 TO 18:LSET P$(I)=MKI$(P(I)):NEXT I:PUT #2,C:GOTO 1000
13000 REM****************************************MODIFY GAME
13005 ZZZ = 999:GOSUB 13010:IF L=O THEN LOCATE 25,1:GOTO 27000
13007 GOTO 13330
13010 CLS:PRINT"Please enter the date of the game which needs to be modified":INPUT"using the form mm/dd/yy. ",DT$
13020 GOSUB 25030
13030 OPEN "golfptr.dat" FOR INPUT AS #1:INPUT #1,K:CLOSE #1:OPEN "golfers.dat" FOR INPUT AS #4:FOR I = 1 TO K:LINE INPUT #4,TN$(I):NEXT I
13100 CLS:GOSUB 23000:IF L = 0 THEN PRINT"Sorry, there are no games (or even any courses) listed in our files.":RETURN
13110 PRINT:PRINT:INPUT"Please type the number of the course at which the game was played: ",C
13120 IF C<1 OR C>L THEN PRINT"Wrong number.....please try again.":GOTO 13110
13125 CLS:LOCATE 10,30:PRINT"One moment please....."
13130 FRONTP=O:BACKP=0:TOTP=0:GET #2,C
13140 FOR H = 1 TO 9:FRONTP = FRONTP + CVI(P$(H)):NEXT H
13150 FOR H = 10 TO 18:BACKP = BACKP + CVI(P$(H)):NEXT H:TOTP=FRONTP+BACKP:OPEN "ROUNDPTR.DAT" FOR INPUT AS #1:INPUT #1,ROUNDS:CLOSE #1:OPEN "ROUND.DAT" AS #3 LEN = 59
13210 FIELD #3,8 AS D$,5 AS N$,5 AS C$,5 AS M$,2 AS S$(0),2 AS S$(1),2 AS S$(2),2 AS S$(3),2 AS S$(4),2 AS S$(5),2 AS S$(6),2 AS S$(7),2 AS S$(8),2 AS S$(9),2 AS S$(10),2 AS S$(11),2 AS S$(12),2 AS S$(13),2 AS S$(14),2 AS S$(15),2 AS S$(16),2 AS S$(17)
13220 G=0:FOR I = 1 TO ROUNDS:GET #3,I:IF D$<>DT$ OR CVI(C$)<>C THEN 13310
13270 G=G+1:R(G) = I:PLYR(G) = CVI(N$):MONEY(G)=CVI(M$):CORS=CVI(C$):FOR H=0 TO 17:S(G,H+1)=CVI(S$(H)):NEXT H:MONEY(G)=CVI(M$)
13310 NEXT I
13320 IF G = 0 THEN CLS:PRINT"Sorry, there are no entries for ";DT$;" at ";COURSE$:LOCATE 25,1:GOTO 27000
13325 RETURN
13330 PLYRS = G:GOSUB 7600
13340 FOR I = 1 TO G:LSET D$=DT$:LSET M$=MKI$(MONEY(I)):LSET N$=MKI$(PLYR(I)):LSET C$=MKI$(CORS):FOR H= 0 TO 17:LSET S$(H)=MKI$(S(I,H+1)):NEXT H:PUT #3,R(I):NEXT I
13440 GOTO 1000
14000 REM****************************************DISPLAY LIST OF PLAYERS
14010 CLS:GOSUB 22000
14015 IF (K+1)/2 = Y THEN PRINT
14020 LOCATE 25,1:GOTO 27000
15000 REM****************************************DISPLAY PLAYER AVERAGES
15005 CLS:LOCATE 10,30:PRINT"One moment please.....":GOSUB 15010:GOTO 15286
15010 OPEN "roundptr.dat" FOR INPUT AS #1:INPUT #1,ROUNDS:CLOSE #1:OPEN "ROUND.DAT" AS #3 LEN=59
15050 FIELD #3,8 AS D$,5 AS N$,5 AS C$,5 AS M$,2 AS S$(0),2 AS S$(1),2 AS S$(2),2 AS S$(3),2 AS S$(4),2 AS S$(5),2 AS S$(6),2 AS S$(7),2 AS S$(8),2 AS S$(9),2 AS S$(10),2 AS S$(11),2 AS S$(12),2 AS S$(13),2 AS S$(14),2 AS S$(15),2 AS S$(16),2 AS S$(17)
15060 OPEN "golfptr.dat" FOR INPUT AS #1:INPUT #1,K
15080 CLOSE #1:IF K=0 THEN CLS:PRINT"Sorry, there are no registered golfers.":LOCATE 25,1:GOTO 27000
15090 OPEN "golfers.dat" FOR INPUT AS #4:FOR I=1 TO K:LINE INPUT #4,TN$(I)
15120 NEXT I:FOR PL=1 TO K:GAMTOT(PL)=0:SCORTOT(PL)=0:NEXT PL
15165 GOSUB 27500
15170 FOR GAM=1 TO ROUNDS:GET #3,GAM
15185 GET #2,CVI(C$):IF INSTR(COURSE$,CC$)<>0 THEN 15280
16005 CLS:LOCATE 10,30:PRINT"One moment please.....":GOSUB 16010:GOTO 16240
16010 OPEN "roundptr.dat" FOR INPUT AS #1:INPUT #1,ROUNDS:CLOSE #1:OPEN"ROUND.DAT" AS #3 LEN=59
16050 FIELD #3,8 AS D$,5 AS N$,5 AS C$,5 AS M$,2 AS S$(0),2 AS S$(1),2 AS S$(2),2 AS S$(3),2 AS S$(4),2 AS S$(5),2 AS S$(6),2 AS S$(7),2 AS S$(8),2 AS S$(9),2 AS S$(10),2 AS S$(11),2 AS S$(12),2 AS S$(13),2 AS S$(14),2 AS S$(15),2 AS S$(16),2 AS S$(17)
16060 OPEN "golfptr.dat" FOR INPUT AS #1:INPUT #1,K
16080 CLOSE #1:IF K = 0 THEN CLS:PRINT"Sorry, there are no registered golfers.":LOCATE 25,1:GOTO 27000
16090 OPEN "GOLFERS.DAT" FOR INPUT AS #4:FOR I=1 TO K:LINE INPUT #4,TN$(I):NEXT I:FOR PL=1 TO K:MONTOT(PL)=0:GAMTOT(PL)=0:NEXT PL:FOR GAM=1 TO ROUNDS:GET #3,GAM:PL=CVI(N$)
16294 PRINT CHR$(29);:IF GAMTOT(PL)<100 THEN 16298
16296 PRINT CHR$(29);:IF GAMTOT(PL)<1000 THEN 16298
16297 PRINT CHR$(29);
16298 PRINT GAMTOT(PL)
16300 IF MONTOT(PL)>999 OR MONTOT(PL)<-999 THEN LOCATE 2+PL-P,65:PRINT MONTOT(PL):GOTO 16340
16310 IF MONTOT(PL)>99 OR MONTOT(PL)<-99 THEN LOCATE 2+PL-P,66:PRINT MONTOT(PL):GOTO 16340
16320 IF MONTOT(PL)>9 OR MONTOT(PL)<-9 THEN LOCATE 2+PL-P,67:PRINT MONTOT(PL):GOTO 16340
16330 LOCATE 2+PL-P,68:PRINT MONTOT(PL)
16340 C=C+1:NEXT PL
16350 LOCATE 25,1:IF C=K THEN 27000
16360 PRINT"Press any key to continue...";
16370 A$=INKEY$
16380 IF A$="" THEN 16370
16390 P=P+21:GOTO 16241
17000 REM***************DISPLAY INDIVIDUAL PLAYER'S AVERAGE FOR SPECIFIC COURSE
17005 GOSUB 17010:GOTO 17390
17010 CLS:GOSUB 22000:PRINT:PRINT:IF K = 0 THEN LOCATE 25,1:GOTO 27000
17020 PRINT:PRINT:INPUT"Please enter the number of the player you would like to know about? ",X
17030 IF X<1 OR X>K THEN PRINT"Wrong number.....please try again.":GOTO 17020
17040 CLS:GOSUB 23000:IF L=0 THEN PRINT"Sorry, there are no courses listed in our files.":LOCATE 25,1:GOTO 27000
17050 PRINT
17060 PRINT:INPUT"Please enter the number of the course you would like to know about? ",Y
17070 IF Y<1 OR Y>L THEN PRINT"Wrong number.....please try again.":GOTO 17060
17075 CLS:LOCATE 10,30:PRINT"One moment please....."
17080 GET #2,Y
17081 FRONT = 0:BACK = 0:FOR H = 1 TO 9:FRONT = FRONT +CVI(P$(H)):BACK = BACK + CVI(P$(H+9)):NEXT H
17090 OPEN "roundptr.dat" FOR INPUT AS #1:INPUT #1,ROUNDS:CLOSE #1:OPEN "ROUND.DAT" AS #3 LEN=59
17130 FIELD #3,8 AS D$,5 AS N$,5 AS C$,5 AS M$,2 AS S$(0),2 AS S$(1),2 AS S$(2),2 AS S$(3),2 AS S$(4),2 AS S$(5),2 AS S$(6),2 AS S$(7),2 AS S$(8),2 AS S$(9),2 AS S$(10),2 AS S$(11),2 AS S$(12),2 AS S$(13),2 AS S$(14),2 AS S$(15),2 AS S$(16),2 AS S$(17)
17140 GAMTOT=0:FRONTT=0:BACKT=0:FOR H=1 TO 18:T(H)=0:NEXT H:FOR GAM=1 TO ROUNDS:GET #3,GAM
17200 IF X <> CVI(N$) OR Y <> CVI(C$) THEN 17260
17210 GAMTOT = GAMTOT+1:FOR H=1 TO 18:T(H)=T(H)+CVI(S$(H-1)):NEXT H
17260 NEXT GAM
17270 FOR H=1 TO 9:FRONTT = FRONTT +T(H):BACKT = BACKT+T(H+9):NEXT H
17340 IF GAMTOT=0 THEN CLS:PRINT"Sorry, ";TN$(X);" has no recorded rounds at ";COURSE$;:LOCATE 25,1:GOTO 27000
17350 FAVG!=FRONTT/GAMTOT:BAVG!=BACKT/GAMTOT:TOTAVG!=(FRONTT+BACKT)/GAMTOT:FOR H=1 TO 18:AVG!(H)=T(H)/GAMTOT:NEXT H
17385 RETURN
17390 CLS
17400 LOCATE 1,40:PRINT"Player: ";TN$(X):LOCATE 2,40:PRINT"Course: ";COURSE$:LOCATE 3,40:PRINT"Games Played: ";GAMTOT:LOCATE 4,1:PRINT:FOR H=1 TO 18:IF H<10 THEN PRINT " ";
17440 PRINT H;" ";:PRINT USING"###.##";AVG!(H);:PRINT" ";CVI(P$(H)):NEXT H
17490 LOCATE 14,40:PRINT"Total ";:PRINT USING "###.##";TOTAVG!;:PRINT" ";FRONT +BACK
17500 LOCATE 22,32
17510 GOTO 27000
18000 REM**********************DISPLAY INDIVIDUAL PLAYER'S HOLE AVERAGES BY PAR
18005 GOSUB 18010:IF K=0 THEN LOCATE 25,1:GOTO 27000
18007 GOTO 18330
18010 CLS:GOSUB 22000:IF K=O THEN RETURN
18020 PRINT:PRINT
18030 PRINT:INPUT"Please enter the number of the player you would like to know about? ",X
18040 IF X<1 OR X>K THEN PRINT"Wrong number.....please try again.":GOTO 18030
18045 CLS:LOCATE 10,30:PRINT"One moment please....."
18050 OPEN "COURSE.DAT" AS #2 LEN = 62
18060 FIELD #2,26 AS COURSE$,2 AS P$(1),2 AS P$(2),2 AS P$(3),2 AS P$(4),2 AS P$(5),2 AS P$(6),2 AS P$(7),2 AS P$(8),2 AS P$(9),2 AS P$(10),2 AS P$(11),2 AS P$(12),2 AS P$(13),2 AS P$(14),2 AS P$(15),2 AS P$(16),2 AS P$(17),2 AS P$(18)
18070 OPEN "roundptr.dat" FOR INPUT AS #1:INPUT #1,ROUNDS:CLOSE #1:OPEN "round.dat" AS #3 LEN=59
18110 FIELD #3,8 AS D$,5 AS N$,5 AS C$,5 AS M$,2 AS S$(0),2 AS S$(1),2 AS S$(2),2 AS S$(3),2 AS S$(4),2 AS S$(5),2 AS S$(6),2 AS S$(7),2 AS S$(8),2 AS S$(9),2 AS S$(10),2 AS S$(11),2 AS S$(12),2 AS S$(13),2 AS S$(14),2 AS S$(15),2 AS S$(16),2 AS S$(17)
18120 GMTOT=0:P3STOT=0:P3HTOT=0:P4STOT=0:P4HTOT=0:P5STOT=0:P5HTOT=0:FOR I=1 TO ROUNDS:GET #3,I
18180 GET #2,CVI(C$):IF INSTR(COURSE$,CC$)<>0 OR X<>CVI(N$) THEN 18260
18200 GMTOT = GMTOT +1
18210 FOR H = 1 TO 18
18220 IF CVI(P$(H)) = 3 THEN P3STOT = P3STOT+CVI(S$(H-1)):P3HTOT = P3HTOT+1:GOTO 18250
18230 IF CVI(P$(H)) = 4 THEN P4STOT = P4STOT+CVI(S$(H-1)):P4HTOT = P4HTOT+1:GOTO 18250
19005 GOSUB 19010:IF K=0 THEN LOCATE 25,1:GOTO 27000
19006 GOTO 19137
19010 CLS:GOSUB 22000
19012 IF K=O THEN RETURN
19015 PRINT:IF Y = (K+1)/2 THEN PRINT
19020 PRINT:INPUT"Please type the number of the player you would like to know about: ",PR
19030 IF PR<1 OR PR>K THEN PRINT"Wrong number.....please try again.":GOTO 19020
19035 CLS:LOCATE 10,30:PRINT"One moment please....."
19050 OPEN "roundptr.dat" FOR INPUT AS #1:INPUT #1,ROUNDS:CLOSE #1:OPEN "round.dat" AS #3 LEN=59
19090 FIELD #3,8 AS D$,5 AS N$,5 AS C$,5 AS M$,2 AS S$(0),2 AS S$(1),2 AS S$(2),2 AS S$(3),2 AS S$(4),2 AS S$(5),2 AS S$(6),2 AS S$(7),2 AS S$(8),2 AS S$(9),2 AS S$(10),2 AS S$(11),2 AS S$(12),2 AS S$(13),2 AS S$(14),2 AS S$(15),2 AS S$(16),2 AS S$(17)
19100 OPEN "COURSPTR.DAT" FOR INPUT AS #1:INPUT #1,L:OPEN "course.dat" AS #2 LEN=62
19130 FIELD #2,26 AS COURSE$,2 AS P$(1),2 AS P$(2),2 AS P$(3),2 AS P$(4),2 AS P$(5),2 AS P$(6),2 AS P$(7),2 AS P$(8),2 AS P$(9),2 AS P$(10),2 AS P$(11),2 AS P$(12),2 AS P$(13),2 AS P$(14),2 AS P$(15),2 AS P$(16),2 AS P$(17),2 AS P$(18)
19135 RETURN
19137 C=0:P=0
19140 R=0:FOR I=1 TO ROUNDS:GET #3,I
19145 IF PR<>CVI(N$) THEN 19205
19150 IF R=0 THEN CLS:PRINT TN$(PR):PRINT:PRINT"DATE COURSE MONEY FRONT BACK TOTAL":PRINT
19155 GET #2,CVI(C$):PRINT D$;SPC(5);COURSE$;SPC(2);
19160 IF CVI(M$)<-999 OR CVI(M$)>999 THEN PRINT SPC(2);CVI(M$);:GOTO 19180
19165 IF CVI(M$)<-99 OR CVI(M$)>99 THEN PRINT SPC(3);CVI(M$);:GOTO 19180
19170 IF CVI(M$)<-9 OR CVI(M$)>9 THEN PRINT SPC(4);CVI(M$);:GOTO 19180
19175 PRINT SPC(5);CVI(M$);
19180 FRONT = 0:BACK = 0:FOR H = 0 TO 8:FRONT = FRONT + CVI(S$(H)):NEXT H:FOR H = 9 TO 17:BACK = BACK + CVI(S$(H)):NEXT H
19185 PRINT SPC(10)FRONT;SPC(4);BACK;
19190 IF FRONT + BACK >99 THEN PRINT SPC(3);FRONT+BACK:GOTO 19200
19195 PRINT SPC(4)FRONT+BACK
19200 R=1
19202 C=C+1:IF C-P=19 THEN LOCATE 25,1 ELSE 19205
19203 P=C:R=0:PRINT"Press any key to continue...";
19204 A$=INKEY$:IF A$="" THEN 19204
19205 NEXT I
19210 IF R = O THEN CLS:PRINT"Sorry, ";TN$(PR);" has no recorded rounds."
19215 LOCATE 25,1:GOTO 27000
20000 REM****************************************DISPLAY COURSE DATA
20010 CLS:GOSUB 23000:IF L=0 THEN PRINT"Sorry, there are no courses listed in our files.":LOCATE 25,1:GOTO 27000
20020 PRINT:PRINT:PRINT "Would you like detailed information about a course?":PRINT"Please type `Y' or `N': ";
20030 INPUT"",A$
20040 IF A$ = "Y" OR A$ = "y" THEN 20070
20050 IF A$ = "n" OR A$ = "N" THEN 1000
20060 BEEP:PRINT"Please type `Y' or `N'. ";:GOTO 20030
20070 PRINT:INPUT"Please enter the number of the course you would like to know about. ",COURSE
20080 IF COURSE <1 OR COURSE >L THEN PRINT"Wrong number.....please try again.":GOTO 20070
20090 GET #2,COURSE:CORS$=COURSE$:FOR I=1 TO 18:P(I)=CVI(P$(I)):NEXT I
21010 FOR X=1 TO 8:LOCATE X+14,1:FOR Y = 1 TO 80:PRINT" ";:NEXT Y:NEXT X
21020 LOCATE 21,1:FOR I = 1 TO 60:PRINT" ";:NEXT I
21030 LOCATE 23,1:FOR I = 1 TO 40:PRINT" ";:NEXT I
21040 RETURN
22000 REM****************************************LIST OF GOLFERS
22005 GOSUB 22010:GOTO 22080
22010 OPEN "golfptr.dat" FOR INPUT AS #1:INPUT #1,K
22030 CLOSE #1:IF K=0 THEN CLS:PRINT"Sorry, there are no registered golfers.":RETURN
22040 OPEN "golfers.dat" FOR INPUT AS #4:FOR I=1 TO K:LINE INPUT #4,TN$(I):NEXT I:RETURN
22080 IF K=0 THEN RETURN
22085 Y=K/2:CLS:LOCATE 1,1
22090 FOR I=1 TO Y:LOCATE I,1
22110 IF I>9 THEN PRINT I;CHR$(29);". ";TN$(I);:GOTO 22130
22120 PRINT " ";I;CHR$(29);". ";TN$(I);
22130 NEXT I
22140 FOR I=(Y+1) TO K
22150 LOCATE (I-Y),40
22160 IF I>9 THEN PRINT I;CHR$(29);". ";TN$(I);:GOTO 22180
22170 PRINT " ";I;CHR$(29);". ";TN$(I);
22180 NEXT I
22190 RETURN
23000 REM****************************************LIST OF COURSES
23010 OPEN "COURSPTR.DAT" FOR INPUT AS #1:INPUT #1,L
23030 CLOSE #1:IF L=0 THEN RETURN
23040 OPEN "COURSE.DAT" AS #2 LEN=62
23050 FIELD #2,26 AS COURSE$,2 AS P$(1),2 AS P$(2),2 AS P$(3),2 AS P$(4),2 AS P$(5),2 AS P$(6),2 AS P$(7),2 AS P$(8),2 AS P$(9),2 AS P$(10),2 AS P$(11),2 AS P$(12),2 AS P$(13),2 AS P$(14),2 AS P$(15),2 AS P$(16),2 AS P$(17),2 AS P$(18)
27510 OPEN "COURSPTR.DAT" FOR INPUT AS #1:INPUT #1,L:CLOSE #1:OPEN "COURSE.DAT" AS #2 LEN=62
27540 FIELD #2,26 AS COURSE$,2 AS P$(1),2 AS P$(2),2 AS P$(3),2 AS P$(4),2 AS P$(5),2 AS P$(6),2 AS P$(7),2 AS P$(8),2 AS P$(9),2 AS P$(10),2 AS P$(11),2 AS P$(12),2 AS P$(13),2 AS P$(14),2 AS P$(15),2 AS P$(16),2 AS P$(17),2 AS P$(18)
27545 RETURN
28000 CLOSE:REM****************************************PRINT MENU
28010 GOSUB 26000:LOCATE 7,20:PRINT"HERE'S THE INFORMATION YOU CAN HAVE PRINTED":GOSUB 4030:GOTO 28200
28200 LOCATE 20,20
28210 INPUT"Please type the number of your choice. ",A
28220 ON A GOTO 28300,28400,28500,29400,28600,28700,28800,28900,29200,1000
28230 BEEP:GOTO 28200
28300 REM****************************************PRINT LIST OF GOLFERS
28310 CLS:LOCATE 10,30:PRINT"One moment please.....":GOSUB 22010:IF K=0 THEN LOCATE 25,1:GOTO 27000
28315 LPRINT"REGISTERED GOLFERS":LPRINT:FOR I=1 TO K:IF I<10 THEN LPRINT" ";
28320 LPRINT I;" ";TN$(I):NEXT I:GOTO 1000
28400 REM*****************************************PRINT PLAYER AVERAGES
28405 CLS:LOCATE 10,30:PRINT"One moment please.....":GOSUB 15010
28410 LPRINT"PLAYER GAMES PLAYED AVERAGE":LPRINT
28415 FOR PL = 1 TO K
28420 IF GAMTOT(PL)= 0 THEN AVG!(PL) = 0:GOTO 28445
28425 AVG!(PL)=SCORTOT(PL)/GAMTOT(PL)
28430 IF GAMTOT(PL)>999 THEN GAMDIG(PL)=4:GOTO 28450
28435 IF GAMTOT(PL)>99 THEN GAMDIG(PL) =3:GOTO 28450
28440 IF GAMTOT(PL)>9 THEN GAMDIG(PL) =2:GOTO 28450
28830 IF CVI(M$)<-999 OR CVI(M$)>999 THEN LPRINT SPC(2);CVI(M$);:GOTO 28850
28835 IF CVI(M$)<-99 OR CVI(M$)>99 THEN LPRINT SPC(3);CVI(M$);:GOTO 28850
28840 IF CVI(M$)<-9 OR CVI(M$)>9 THEN LPRINT SPC(4);CVI(M$);:GOTO 28850
28845 LPRINT SPC(5);CVI(M$);
28850 FRONT = 0:BACK = 0:FOR H = 0 TO 8:FRONT = FRONT + CVI(S$(H)):NEXT H:FOR H = 9 TO 17:BACK = BACK + CVI(S$(H)):NEXT H
28855 LPRINT SPC(10)FRONT;SPC(4);BACK;
28860 IF FRONT + BACK >99 THEN LPRINT SPC(3);FRONT+BACK:GOTO 28870
28865 LPRINT SPC(4)FRONT+BACK
28870 R=1
28875 NEXT I
28880 IF R = O THEN CLS:PRINT"Sorry, ";TN$(PR);" has no recorded rounds.":PRINT:PRINT:PRINT:GOTO 27000
28885 GOTO 1000
28900 REM****************************************PRINT COURSE DATA
28905 OPEN "COURSPTR.DAT" FOR INPUT AS #1:INPUT #1,L
28915 CLOSE #1:IF L = 0 THEN CLS:PRINT"Sorry, there are no courses listed in our files.":LOCATE 25,1:GOTO 27000
28920 OPEN "COURSE.DAT" AS #2 LEN = 62
28925 FIELD #2,26 AS COURSE$,2 AS P$(1),2 AS P$(2),2 AS P$(3),2 AS P$(4),2 AS P$(5),2 AS P$(6),2 AS P$(7),2 AS P$(8),2 AS P$(9),2 AS P$(10),2 AS P$(11),2 AS P$(12),2 AS P$(13),2 AS P$(14),2 AS P$(15),2 AS P$(16),2 AS P$(17),2 AS P$(18)
28930 CLS:PRINT"Would you like to print a list of all courses?":PRINT"Please type `Y' or `N'. ";
28935 INPUT"",A$
28940 IF A$="Y" OR A$="y" THEN 28955
28945 IF A$ = "N" OR A$ = "n" THEN 29005
28950 BEEP:PRINT"Please type `Y' or `N'. ";:GOTO 28935
28955 CLS:LOCATE 10,30:PRINT"One moment please.....":LPRINT"COURSE";SPC(31);"FRONT PAR";SPC(5);"BACK PAR";SPC(10);"TOTAL PAR":LPRINT
28960 FOR I = 1 TO L:GET #2,I:FRONT=0:BACK=0:FOR H=1 TO 9:FRONT=FRONT+CVI(P$(H)):BACK=BACK+CVI(P$(H+9)):NEXT H:LPRINT COURSE$;SPC(15)FRONT;SPC(9)BACK;SPC(15)FRONT+BACK:NEXT I
29005 PRINT:PRINT:PRINT "Would you like to print detailed information about a course?":PRINT"Please type `Y' or `N': ";
29010 INPUT"",A$
29015 IF A$ = "Y" OR A$ = "y" THEN 29030
29020 IF A$ = "n" OR A$ = "N" THEN 1000
29025 BEEP:PRINT"Please type `Y' or `N'. ";:GOTO 29010
29030 CLS:CLOSE:GOSUB 23000:PRINT:PRINT:INPUT"Please enter the number of the course you would like to know about. ",COURSE
29040 IF COURSE <1 OR COURSE >L THEN PRINT"Wrong number.....please try again.":GOTO 20070
29045 CLS:LOCATE 10,30:PRINT"One moment please.....":GET #2,COURSE
29050 CORS$=COURSE$:FOR I=1 TO 18:P(I)=CVI(P$(I)):NEXT I:FP=0:BP=0:LPRINT CORS$:LPRINT
30000 REM****************************************DISPLAY GAME RESULTS
30010 CLS:PRINT"Please enter the date of the game to be displayed":INPUT"using the form mm/dd/yy. ",DT$:GOSUB 13020
30020 IF L=0 THEN LOCATE 25,1:GOTO 27000
30025 PLYRS=G:GOSUB 7605
30030 LOCATE 25,1:GOTO 27000
30100 REM*****************************DISPLAY ALL PLAYERS' HOLE AVERAGES BY PAR
30102 GOSUB 30105:GOTO 30225
30105 CLS:LOCATE 10,30:PRINT"One moment please.....":GOSUB 22010:IF K=0 THEN LOCATE 25,1:GOTO 27000
30120 OPEN "COURSE.DAT" AS #2 LEN = 62
30125 FIELD #2,26 AS COURSE$,2 AS P$(1),2 AS P$(2),2 AS P$(3),2 AS P$(4),2 AS P$(5),2 AS P$(6),2 AS P$(7),2 AS P$(8),2 AS P$(9),2 AS P$(10),2 AS P$(11),2 AS P$(12),2 AS P$(13),2 AS P$(14),2 AS P$(15),2 AS P$(16),2 AS P$(17),2 AS P$(18)
30126 OPEN "roundptr.dat" FOR INPUT AS #1:INPUT #1,ROUNDS:CLOSE #1:OPEN "round.dat" AS #3 LEN=59
30129 FIELD #3,8 AS D$,5 AS N$,5 AS C$,5 AS M$,2 AS S$(0),2 AS S$(1),2 AS S$(2),2 AS S$(3),2 AS S$(4),2 AS S$(5),2 AS S$(6),2 AS S$(7),2 AS S$(8),2 AS S$(9),2 AS S$(10),2 AS S$(11),2 AS S$(12),2 AS S$(13),2 AS S$(14),2 AS S$(15),2 AS S$(16),2 AS S$(17)
30130 FOR PL = 1 TO K:GMTOT(PL)=0:P3HTOT(PL)=0:P3STOT(PL)=0:P4HTOT(PL)=0:P4STOT(PL)=0:P5HTOT(PL)=0:P5STOT(PL)=0:NEXT PL:FOR I=1 TO ROUNDS
30150 GET #3,I:PL=CVI(N$)
30155 GET #2,CVI(C$):IF INSTR(COURSE$,CC$)<>0 THEN 30186
30160 GMTOT(PL)=GMTOT(PL)+1:FOR H=1 TO 18
30170 IF CVI(P$(H)) = 3 THEN P3STOT(PL)=P3STOT(PL)+CVI(S$(H-1)):P3HTOT(PL)= P3HTOT(PL)+1:GOTO 30182
30175 IF CVI(P$(H)) = 4 THEN P4STOT(PL)=P4STOT(PL)+CVI(S$(H-1)):P4HTOT(PL)= P4HTOT(PL)+1:GOTO 30182